package com.yang.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

/**
 * @author Administrator
 * @decription
 * @Date 2018-05-22 9:33
 */
@Service
public class HelloService {

    @Autowired
    private RestTemplate restTemplate;

    public String getHelloInfo(String name) {
        return restTemplate.getForObject("http://SERVER-SAY-HI/hi?name="+name,String.class);
    }
}
